<include file="Public:header" />



<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h" >
    
 
 
    
      <form action="{:U('index')}" method="get" class="fr form-inline">
      
      <notempty name="suppier">
      
      <select name="supplier_id" class="form-control">
          <option value="0">请选择供货商1</option>
          <?php var_dump($suppier); ?>
          <volist name="suppier" id="vo"> <option 
            <eq name="supplier_id" value="$vo['id']">selected="selected"</eq>
             value="{$vo.id}"><?php echo cut_str($vo['susername'],12); ?>
            </option>
          </volist>
        </select>
      
      </notempty>
      
      
      下单时间：<input class="form-control" type="text" onclick="WdatePicker();" name="stime" value="{$stime}" /> 至 <input class="form-control" type="text" onclick="WdatePicker();" name="etime" value="{$etime}" />
      
        <select name="status" id="status" class="form-control">
          <option value="">物流状态</option>
         
            <option <eq name="status" value="1">selected="selected"</eq> value="1">已发货</option>
            <option <eq name="status" value="0">selected="selected"</eq> value="0">未发货</option>
        </select>
        
        
        
        
        
        <select name="shipping_id" id="shipping_id" class="form-control">
          <option value="">选择物流方式</option>
         <volist name="shippingList" id="vo">
            <option <eq name="shipping_id" value="$vo['id']">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
          </volist>
           
            
        </select>
        
        
        
        
        <select name="getExcel" id="status" class="form-control">
          <option value="">查看列表</option>
          
          
          
          
            <option <eq name="getExcel" value="1">selected="selected"</eq> value="1">导出发货单</option>
            
            
            <option <eq name="getExcel" value="2">selected="selected"</eq> value="2">导出快递单</option>
        </select>
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" placeholder="输入订单号搜索" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
      
      <div style="clear:both;"></div>
      </div>
 <div class="table_" >
 <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>
    <td align="center">ID</td>
    <td align="center">会员名</td>
    <td align="center">订单号</td>
    <td align="center">总价</td>
    <td align="center">配送方式</td>
    <!--<td align="center">供货商</td>-->
    <td align="center">状态</td>
    <td align="center">下单时间</td>
    <td align="center">操作</td>
  </tr>
</thead>
<volist name="list" id="vo">
  <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />{$vo.id}</td>
    <td>
   <notempty name="vo['yourname']">     收货人：{$vo.yourname}　</notempty>会员ID:{$vo.member_id}　昵称：{$vo.nickname}
    
   <notempty name="vo['tel']"> 
    <br>
    
电话：{$vo.tel}</notempty>
<notempty name="vo['address']"> <br>
地址：{$vo.address}
</notempty>
<notempty name="vo['taxtitle']"> 
<br>
发票抬头:<span style="color:#f00;">{$vo['taxtitle']}</span>
</notempty></td>
    <td align="center">{$vo.ordernumber}</td>
    <td><span style="font-size:16px; font-weight:bold; color:#f00;">¥{$vo.total}</span></td>
    <td align="left">{:getShippingName($vo['shipping_id'])}
    <notempty name="vo['logistics_num']">
    单号：{$vo.logistics_num}
    </notempty>
    </td>
    <!--<td align="center"><a target="_blank" href="{:U('Supplier/edit',array('id' => $vo['supplier_id']))}">{:getSupplier($vo['supplier_id'])}</a></td>-->
    <td align="center">
    
    <!-- 0未发货，1部分发货，2全部发货，3部分确认，4全部确认 -->
    <eq name="vo['shipping_status']" value="0">未发货</eq>
    <eq name="vo['shipping_status']" value="1"><span style="color:#E8EB99; font-weight:bold; padding:4px; background:#D9534F;">部分发货</span></eq>
    <eq name="vo['shipping_status']" value="2"><span style="color:#C7CC3A; font-weight:bold; padding:4px;">全部发货</span></eq>
    <eq name="vo['shipping_status']" value="3">部分确认</eq>
    <eq name="vo['shipping_status']" value="4"><span style="color:#0ACD4B; font-weight:bold;">全部确认</span></eq>
    
    </td>
    <td align="center">{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
    <td align="center"> <?php if($levelnum ==1 and $vo['shipping_status']==0 ){ ?>
        <a href="" class="btn btn-success btn-xs" data-toggle="modal" data-target="#myModal"  style="font-size:12px;" onClick=" document.getElementById('order_id').value={$vo.order_id}" >发货</a>
        <?php } ?>
        　<a onClick="art.dialog.open('{:U('read',array('supplier_id' =>$supplier_id, 'id'=>$vo['order_id']))}', {width: 800, height: 500,lock:true,title:'发货单<?php echo $vo['ordernumber'];?>'});" href="##" class="btn btn-warning btn-xs" >查看</a>
    </td>
  </tr>
</volist>
</table>
 
      <div class="pages">
        <div class="controlList fl">
        
         
        <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="update_sort('id','sort','','{:U('dosort')}');"><i class="glyphicon glyphicon-refresh"></i> 更新排序</a><a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="total_amount('id');" ><i class="glyphicon glyphicon-usd"></i> 总计金额</a> 
        
        </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
      
      
      
      
    </div>
  </div>
  <div class="clear"></div>
  
  <!-- 物流弹出框 -->
  
  <!-- Modal -->
<form action="{:U('logistics')}" method="post">
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">物流管理</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2">物流单号</label>
            <br>
            <input type="hidden" value="" id="order_id" name="order_id">
            <input type="text" class="form-control" id="exampleInputName2" name="logistics_num" placeholder="请填写快递物流单号">
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div>
    </div>
</form>  
</div>
<include file="Public:footer" />